package com.java.bean;

import com.java.util.DateUtil;

public class BootstrapTableUser {
    private int id;
    private String name;
    private String phone;
    private String password;
    private String regtime;
    private String logintime;
    private String status;
    private String email;

    public BootstrapTableUser(User user) {
        if (user == null) return;
        id = user.getId();
        name = user.getName();
        phone = user.getPhone();
        password = user.getPassword();
        regtime = DateUtil.format(user.getRegtime());
        logintime = DateUtil.format(user.getLogintime());
        status = user.getStatus() == 0 ? "正常" : user.getStatus() == 1 ? "已被删除" : "异常";
        email = user.getEmail();
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getRegtime() {
        return regtime;
    }

    public void setRegtime(String regtime) {
        this.regtime = regtime;
    }

    public String getLogintime() {
        return logintime;
    }

    public void setLogintime(String logintime) {
        this.logintime = logintime;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }
}
